package com.java.repository;

import com.java.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository //交给spring管理
public interface HostpitalRespository extends MongoRepository<Hospital,String> {

    /**
     * getHospitalByHoscode 这个方法根据springdata规范来的
     * @param hoscode
     * @return
     */
    Hospital getHospitalByHoscode(String hoscode);


    List<Hospital> findHospitalByHosnameLike(String hosname);

    Hospital findHospitalByHoscode(String hoscode);
}
